{:W('Template/top')}
<div class="wrapper clearfix content" style="position: relative;border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="#">统计报表</a>&gt;订单报表</div>
        <div class="cTitle2">订单报表</div>

        <in name="Think.session.role_id" value="$operatorData">
            <input type="hidden" class="operatorId" value="{$oid}">

            <div class="status">
                <label>运营商：</label>
                <foreach name="operatorList" item="vo">
                    <a class="nav-operator-report-state nav-operator-report-state{$vo.id}"
                       href="{:U('Report/orderReport', array('id' => I('get.id'), 'oid' => $vo['id']))}">{$vo.display_name}
                    </a>
                </foreach>
            </div>
        </in>

        <div class="main-search">
            <div class="top">
                <form method="get" action="{:U('Report/orderReport',array('id' => I('get.id'), 'oid' => I('get.oid')))}" class="form-inline">
                    <div class="form-group">
                        <input type="text" name="entity_name" class="form-control" placeholder="代理商/供应商简称" value="{$providerName}">
                    </div>
                    <div class="form-group ml">
                        <label>时间：</label>
                        <input type="text" class="form-control ui-datepicker Wdate" name="start_time"
                              value="{$startTime}" id="d4322"
                               onclick="WdatePicker({el: $dp.$('d12')})" style="width:80%">
                    </div>
                    <span class="end">到</span>

                    <div class="form-group">
                        <label class="sr-only"></label>
                        <input type="text" class="form-control ui-datepicker Wdate" name="end_time"
                               value="{$endTime}" id="d4322"
                               onclick="WdatePicker({el: $dp.$('d12')})">
                    </div>
                    <button type="submit" class="btn btn-warning">查询</button>
                </form>
            </div>
        </div>
        <table class="cTable table-hover" width="100%">
            <tr>
                <th width="5%">编号</th>
                <th width="10%">代理商</th>
                <th width="15%">线路名称</th>
                <th width="10%">供应商名称</th>
                <th width="8%">应付全款</th>
                <th width="8%">应付预付</th>
                <th width="8%">实际收入</th>
                <th width="5%">成人</th>
                <th width="5%">儿童</th>
                <th width="8%">团期</th>
                <th width="8%">创建时间</th>
                <th>状态</th>
            </tr>
            <if condition="$info[0]['id'] neq ''">
                <volist name="info" id="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.agency_name}</td>
                        <td>{$vo.tour_name}</td>
                        <td>{$vo.provider_name}</td>
                        <td id="money-right"
                            class="text-c5"><?php echo (($vo['price_adjust'] + $vo['price_total'])/100).".00"; ?></td>
                        <td id="money-right" class="text-c1">{$vo.prepay_amount|GetYuan}</td>
                        <if id="money-right" condition="$vo['state'] eq 6">
                            <td id="money-right">{$vo.prepay_amount_commission|GetYuan}</td>
                            <elseif condition="$vo['state'] eq 7"/>
                            <td id="money-right">{$vo.price_payable_commission|GetYuan}</td>
                        </if>
                        <td class="text-c1">{$vo.client_adult_count}人</td>
                        <td class="text-c1">{$vo.client_child_count}人</td>
                        <td class="text-c1">{$vo.start_time|substr=0,10}</td>
                        <td>{$vo.create_time}</td>
                        <td>
                            <if condition="$vo.state eq 6"><span class="text-c6">已付预付款</span>
                                <elseif condition="$vo.state eq 7"/>
                                <span class="text-c7">已付全款</span>
                            </if>
                        </td>
                    </tr>
                </volist>
                <tr>
                    <td colspan="12" class="text-c1" id="money-right">
                        <h5>实际收入总额: <span class="text-c5">&yen;{$realTotal|GetYuan}</span></h5>
                        <h5>应付全款总额: <span class="text-c5">&yen;{$priceTotal|GetYuan}</span></h5>
                    </td>
                </tr>
                <else/>
                <tr>
                    <td colspan='12' class='text-c5'>没有数据</td>
                </tr>
            </if>
        </table>
        <notempty name="info">
            <div class="pagebox">
                {$page}
            </div>
        </notempty>
    </div>
</div>

<div class="theme-popover-mask"></div>
{:W('Template/bottom')}
</body>
</html>
